package tech.aistar.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.entity.Message;
import tech.aistar.mapper.MessageMapper;
import tech.aistar.service.IMessageService;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: shuaiguo
 * @Date: 2020/10/01/17:43
 * @Description:
 */

@Service
public class MessageImpl implements IMessageService {
    @Autowired
    private MessageMapper messageMapper;

    @Override
    public List<Message> selectAll(Integer registerId) {
        return messageMapper.selectAll(registerId);
    }

    @Override
    public void insert(MessageMapper message) {
messageMapper.insert(message);
    }

    @Override
    public void updateByPrimaryKey(MessageMapper message) {
messageMapper.updateByPrimaryKey(message);
    }

    @Override
    public void deleteByPrimaryKey(Integer id) {
messageMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updatetypeById(Integer id) {
        return messageMapper.updatetypeById(id);
    }

    @Override
    public int deleteById(Integer id) {
        return messageMapper.deleteById(id);
    }
}
